package com.future.email.client;

import com.alibaba.fastjson.JSONObject;
import com.future.email.client.hystrix.LogClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 日志记录客户端
 *
 * @author shiyong
 * 2022/2/19 19:24
 */
@FeignClient(
        contextId = "logClient",
        name = "log-service",
        path = "/log",
        fallback = LogClientFallback.class)
public interface LogClient {
    /**
     * 添加日志
     *
     * @param content 日志内容
     * @return com.alibaba.fastjson.JSONObject
     * @author shiyong
     * 2022/2/19 19:26
    */
    @PostMapping("/addLog")
    JSONObject addLog(@RequestParam String content);
}
